@echo off
chcp 65001

:: 保存当前路径
set "current_path=%cd%"

:: 切换到 %temp% 路径
cd /d "%temp%"

:: 定义文件路径
set "pythonpath_file=pythonpath.txt"

:: 检查文件是否存在
if not exist "%pythonpath_file%" (
    echo 文件 %pythonpath_file% 不存在,请配置该文件
    pause
    cd /d "%current_path%"  :: 切换回原来的路径
    exit /b
)

:: 读取文件内容
for /f "delims=" %%i in (%pythonpath_file%) do (
    set "exe=%%i"
    goto :end_for
)
:end_for

:: 切换回原来的路径
cd /d "%current_path%"


rem 执行命令
%exe% -B "OnlineShop_TaoBao.py"

rem 等待回车结束
pause